package com.example.resourceSharingPlatform.mappers;

import com.example.resourceSharingPlatform.entity.User_trans;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;


public class UserTransRowMapper implements RowMapper<User_trans> {
    @Override
    public User_trans mapRow(ResultSet rs, int i)throws SQLException{
        User_trans user_trans =new User_trans();
        user_trans.setId(rs.getInt("id"));
        user_trans.setUser_id(rs.getString("user_id"));
        user_trans.setTime(rs.getString("time"));
        user_trans.setType(rs.getString("type"));
        return user_trans;
    }
}
